package zzs.generalframework.config.core.database.mysql.dbconfig;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * @title
 * @description
 * @project zzs-config
 * @package zzs.generalframework.config.core.database.mysql.dbconfig
 * @author zzs
 * @date 2018年2月5日
 * @version 1.0
 */
@Component
// 多配置文件引用，若取两个配置文件中有相同属性名的值，则取值为最后一个配置文件中的值
// @PropertySource(value ={
// "classpath:config/database/mysql/database.properties" })
@ConfigurationProperties(value = "classpath:config/database/mysql/database.properties", prefix = "zzs.config.mysql")
public class MysqlDatabaseConfig
{

	@Value("${driverclassname}")
	String driverClassName;

	@Value("${dburl}")
	private String dbUrl;

	@Value("${username}")
	private String username;

	@Value("${userpassword}")
	private String userPassword;

	public String getDriverClassName()
	{
		return driverClassName;
	}

	public String getDbUrl()
	{
		return dbUrl;
	}

	public String getUsername()
	{
		return username;
	}

	public String getUserPassword()
	{
		return userPassword;
	}

}
